import allure

from apis.activity_api import ActivityApi


class ActivityCase(ActivityApi):
    @allure.step("case:ncda_areaList")
    def case_ncda_areaList(self):
        """业务case：NCDA区域列表"""
        ncda_areaList_response = self.ncda_areaList_api()
        res = ncda_areaList_response.json()
        return res

    @allure.step("case:ncda_school_list")
    def case_ncda_school_list(self,data):
        """业务case：NCDA注册的学校列表"""
        ncda_school_list_response = self.ncda_school_list_api(**data)
        res = ncda_school_list_response.json()
        return res

    @allure.step("case:ncda_creator_list")
    def case_ncda_creator_list(self,data):
        """业务case：NCDA创作者列表"""
        ncda_creator_list_response = self.ncda_creator_list_api(**data['json'])
        res = ncda_creator_list_response.json()
        return res

    @allure.step("case:ncda_product_list")
    def case_ncda_product_list(self,data):
        """业务case：NCDA作品列表"""
        ncda_product_list_response = self.ncda_product_list_api(**data['json'])
        res = ncda_product_list_response.json()
        return res

    @allure.step("case:ncda_sell_well_list")
    def case_ncda_sell_well_list(self,data):
        """业务case：NCDA热销作品列表"""
        ncda_sell_well_list_response = self.ncda_sell_well_list_api(**data['json'])
        res = ncda_sell_well_list_response.json()
        return res